package com.gukun.springboot.tdengine.domain.backuprecover;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gukun.springboot.tdengine.pojo.DBConfig;
import lombok.Data;

/**
 * @author zhang
 */
@Data
@TableName(value = "backup_recover_task")
public class BackupRecoverTaskEntity {
    @TableId
    private String id;
    /**
     * 任务名称
     */
    @TableField(value = "name")
    private String name;
    /**
     * 恢复文件路径
     */
    @TableField(value = "file_path")
    private String filePath;
    /**
     * 数据库名称
     */
    @TableField(value = "db_name")
    private String dbName;

    /**
     * 状态
     */
    @TableField(value = "status")
    // 1 启动 0 停止
    private int status;

    /**
     * 描述
     */
    @TableField(value = "task_desc")
    private String desc;

    /**
     * 恢复线程
     */
    @TableField(value = "thread_num")
    private int threadNum;
    /**
     * 操作类型
     * 1 恢复 2 还原
     */
    @TableField(value = "operate_type")
    private int operateType;
    /**
     * 操作对象
     * 2 表 1 数据
     */
    @TableField(value = "operate_target")
    private int operateTarget;
    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private String createTime;
    /**
     * 主机地址和端口
     */
    @TableField(value = "host_and_port")
    private String hostAndPort;

    /**
     * 数据开始时间
     */
    @TableField(value = "data_start_time")
    private String dataStartTime;

    /**
     * 数据结束时间
     */
    @TableField(value = "data_end_time")
    private String dataEndTime;

    @TableField(exist = false)
    private DBConfig dbConfig;

    @TableField(exist = false)
    private int current;
    @TableField(exist = false)
    private int size;
    @TableField(exist = false)
    private int total;
}
